package com.complex.spring.advance.service.event;

import org.springframework.context.ApplicationEvent;

/**
 * spring容器内事件定义,继承ApplicationEvent
 * 也是消息内容的传递者,本例中传了methodName
 * @see com.complex.spring.advance.service.messagesource.MethodExecutionEvent
 * @author gao
 * 
 */
public class MethodExecutionEvent extends ApplicationEvent {

	private static final long serialVersionUID = 9049602356644842132L;
	private String methodName;// 方法名称
	private MethodExecutionStatus methodExecutionStatus;

	public MethodExecutionEvent(Object source) {
		super(source);
	}

	public MethodExecutionEvent(Object source, String method,
			MethodExecutionStatus methodExecutionStatus) {
		super(source);
		this.methodName = method;
		this.methodExecutionStatus = methodExecutionStatus;
	}

	public String getMethodName() {
		return methodName;
	}

	public void setMethodName(String methodName) {
		this.methodName = methodName;
	}

	public MethodExecutionStatus getMethodExecutionStatus() {
		return methodExecutionStatus;
	}

	public void setMethodExecutionStatus(
			MethodExecutionStatus methodExecutionStatus) {
		this.methodExecutionStatus = methodExecutionStatus;
	}

}
